// =====================================================================
// <copyright file="EntityValidationWarning.cs" author="David R. Guindo">
// 	Copyright (C) 2013. All rights reserved.
// </copyright>
// =====================================================================
// This code is released under the terms of the Apache 2.0 license, 
// http://apache.org/licenses/LICENSE-2.0.html
// =====================================================================

namespace AppBlock.Core.Validations
{
    using System;

    /// <summary>
    /// </summary>
    [Serializable]
    public class EntityValidationWarning : ValidationBase, IEntityValidationWarning
    {
        /// <summary>
        ///     Initializes a new instance of the <see cref="EntityValidationWarning" /> class.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="propertyName">Name of the property.</param>
        /// <param name="description">The description.</param>
        public EntityValidationWarning(ValidationType type, string propertyName, string description)
            : base(type, propertyName, description)
        {
        }

        public override string ToString()
        {
            return string.Format("Warning: [{0}]:\t{1}\t{2}", this.PropertyName, this.ValidationType, this.Description);
        }
    }
}